import SysFileAPI from "@/api/sysFile/index";
import type { SysFileQuery } from "@/api/sysFile/model";
import type { IContentConfig } from "@/components/PageContent/index.vue";

const contentConfig: IContentConfig<SysFileQuery> = {
  pageName: "sysFile",
  table: {
    border: true,
    highlightCurrentRow: true,
  },
  indexAction: function (params: SysFileQuery) {
    return SysFileAPI.query(params);
  },
  deleteAction: function (ids: string) {
    return SysFileAPI.delete(ids);
  },
  modifyAction: function (params: any) {
    return SysFileAPI.edit(params);
  },
  pk: "id",
  toolbar: ["add","delete"],
  cols: [
    { width: 50, type: "selection"},
{ label: "文件名称",align: "center",prop: "fileName"    },
{ label: "文件路径",align: "center",prop: "filePath"    },
{ label: "文件大小(字节)",align: "center",prop: "fileSize"    },
{ label: "上传者",align: "center",prop: "uploadUserName"    },
{ label: "上传者id",align: "center",prop: "uploadUser"    },
{ label: "创建时间",align: "center",prop: "createTime"    },
{ label: "更新时间",align: "center",prop: "updateTime"    },
    {
      label: "操作",
      fixed: "right",
      width: 130,
      align: "center",
      template: "tool"
    },
  ],
};

export default contentConfig;